import request from './request';

//获取商品列表数据
export const getShopList = ()=>request('/shops/api/shoplist')

//请求图片地址
export const getIma = (id: string) => request(`/imgs/api/imgSrc/${id}`)

// 请求轮播图数据
export const getBannerList = () => request('/banans/api/getimg')

// 获取藏品详情
export const getGoodsDetail = (id: string) => request(`/shops/api/detail/${id}`)

// 用户相关请求封装
// 请求用户信息
export const getUserInfo = (id: string) => request(`/users/api/user/${id}`)

// 用户修改密码
export const updateUserPass = (id: string, method: string, data: any) => request(`/users/api/pass/${id}`, method, data)

// 获取个人中心藏品
export const getUserGoods = (id: string) => request(`/loves/api/list/${id}`)

// 出售藏品
export const sellUserGoods = (data: any) => request('/loves/api/remove', 'POST', data)